package com.jzoom.zoom.admin.models;


import com.jzoom.zoom.cache.annotations.Cache;
import com.jzoom.zoom.cache.annotations.CacheRemove;
import com.jzoom.zoom.common.annotations.Inject;
import com.jzoom.zoom.dao.Dao;

/**
 * 配置管理,使用数据字典
 */
public class ConfigService {


    @Inject(value = "admin")
    Dao dao;

    @Cache(format = "config_cache:%s")
    public String getConfig(String name){
        return dao.table("sys_dic").where("name",name).where("type","default").getValue("value",String.class);
    }

    @CacheRemove(format = "config_cache:%s")
    public void update(String name){

    }

}
